package com.lazy.book.common.exception;

import com.lazy.book.common.enums.IResponseEnum;
import lombok.Getter;

import java.io.Serial;

@Getter
public class BaseException extends RuntimeException {

  @Serial
  private static final long serialVersionUID = 1L;

  private final IResponseEnum responseEnum;

  private final Object[] args;

  public BaseException(IResponseEnum responseEnum, Object[] args, String message) {
    super(message);
    this.responseEnum = responseEnum;
    this.args = args;
  }

  public BaseException(IResponseEnum responseEnum, Object[] args, String message, Throwable cause) {
    super(message, cause);
    this.responseEnum = responseEnum;
    this.args = args;
  }

}
